<#include "/macro/base.ftl" />
<style type="text/css">
	#w_list_print div{
		width:100%;
	}
</style>
<div class="pageContent">
	<form method="post" action="${base}/sys/sysUser/saveAuthorization" class="pageForm required-validate" onsubmit="return validateCallback(this,  dialogAjaxDone);">
		<div class="pageFormContent" layoutH="58">
				<input name="id" value="${(bean.id?c)!}" type="hidden"/>
				<p>
					<label>用户名：</label>
					<input name="userName" class="required" type="text" size="20" value="${(bean.userName)!}" placeholder="请输入用户名"/> 
					<!--  <span>${(bean.userName)!}</span> -->
				</p>
				<p>
					<label>真实姓名/昵称：</label>
					 <input name="name"  class="required" type="text" size="20" value="${(bean.name)!}" placeholder="姓名/昵称"/>
					<!--	<span>${(bean.name)!}</span> -->
				</p>
				<div id="w_list_print">
					<table class="list" style="text-align: center;" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="116">
						<thead>
							<tr>
								<th align="center" width="50">选择角色</th>
								<th >角色名称</th>
								<th >角色描述</th>
								<th >是否可用</th>
							</tr>
						</thead>
						<tbody>
							<#list allRole as roleBean>
								<tr target="sid" rel="${ roleBean.id?c}">
									<td align="center">
										<input type="checkbox"
										   <#list sysUserRole as surBean>
												  <#if roleBean.id! == surBean.sysRoleId! >checked="checked"</#if> 
										  </#list>
										  name="roleIds" value="${ roleBean.id?c}" /></td>
									<td>${ (roleBean.role)!}</td>
									<td>${ (roleBean.description)!}</td>
									<td><#if roleBean.available! == '0'>禁用</#if><#if roleBean.available! == '1'>可用</#if></td>
								</tr>
							</#list>
						</tbody>
					</table>
				</div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>
